<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String root = request.getContextPath();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<META HTTP-EQUIV="pragma" CONTENT="no-cache" /> 
		<meta http-equiv="expries" content="0" />
		
		<title>Corey Share</title>
		<link rel="stylesheet" href="<%=root%>/style/index.css">
		<link rel="stylesheet" href="<%=root%>/style/calendar_tab.css">
		<link rel="stylesheet" href="<%=root%>/style/easyslider.css">
		<script type="text/javascript"
			src="<%=root%>/scripts/jquery-1.3.2.min.js"></script>
		<script src="<%=root%>/scripts/jquery-tools/js/jquery.tools.min.js"
			type="text/javascript"></script>
		<script src="<%=root%>/scripts/easySlider1.7.js"
			type="text/javascript"></script>
		<script src="<%=root%>/scripts/jquery.corner.js"
			type="text/javascript"></script>
		<script type="text/javascript">
		<!--	
			$(function(){
				$('.title_box,.panel,.calendar_tab').corner("10px");
				$("#slider").easySlider({
					auto: true, 
					continuous: true,
					numeric: true
				});
				//$("#mygalone").slideView();
			});
		-->
		</script>
	</head>
	<body>

		<div id="content_area_content">
			<div id="left_content">
				<div class="title_box">
					<div class="title_box_header">
						<h3>
							相册最近更新
						</h3>
					</div>
					<div class="title_box_body">
						<div
							style="height: 300px; overflow: hidden; margin: 5px 5px 5px 5px;">
							<div id="slider">
								<ul>
									<li>
										<a href="http://templatica.com/preview/30"><img
												src="<%=root%>/images/1_.jpg"
												alt="Css Template Preview" height=300/> </a>
									</li>
									<li>
										<a href="http://templatica.com/preview/7"><img
												src="<%=root%>/images/2_.jpg"
												alt="Css Template Preview"  height=300/> </a>
									</li>
									<li>
										<a href="http://templatica.com/preview/25"><img
												src="<%=root%>/images/3_.jpg"
												alt="Css Template Preview"  height=300/> </a>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div class="title_box_footer"></div>
				</div>
				<s:iterator value="articlePageData.pageData" id="article"
					status="status">
					<div class="title_box">
						<div class="calendar_tab">
							<div class="day">
								<s:date name="#article.writeDate" format="dd" />
								<span class="th_text">th</span>
							</div>
							<div class="year_month">
								<s:date name="#article.writeDate" format="yy-MM" />
							</div>
						</div>
						<div class="title_box_header">
							<h3>
								<a href=###><s:property value="#article.catogoryName" /> </a>
							</h3>
						</div>
						<div class="title_box_body">
							<div class="article_summary">
								<span class="article_title"><a
									href='<%=root%>/system/articleRead.action?readArticle=<s:property value="#article.id" />'><s:property
											value="#article.title" /> </a> </span>
								<div class="article_meta_info">
									<div class="publish_date">
										发表于：
										<s:date name="#article.writeDate" format="yyyy-MM-dd HH:mm" />
										<a href="#">Corey</a>
									</div>
									<div class="comment">
										<a
											href='<%=root%>/system/articleRead.action?readArticle=<s:property value="#article.id"/>#article_comments'><s:property
												value="#article.comments.size()" />个评论</a>
									</div>
								</div>
								<div class="article_content">
									<p>
										<s:property value="#article.summary" escape="false" />
									</p>
								</div>
								<div class="article_read_it">
									<a
										href='<%=root%>/system/articleRead.action?readArticle=<s:property value="#article.id"/>'>阅读全文</a>
								</div>
							</div>
						</div>
						<div class="title_box_footer"></div>
					</div>
				</s:iterator>
				<div class="page_tab"
					style="margin: 10 auto 10 0; width: 624px; height: 30px;">
					<a
						href='<%=root%>/system/home.action?pageIndex=<s:property value="1"/>&catogoryId=<s:property value="catogoryId"/>'>首页</a>
					<a
						href='<%=root%>/system/home.action?pageIndex=<s:property value="articlePageData.pageIndex-1"/>&catogoryId=<s:property value="catogoryId"/>'>前一页</a>
					<s:if test="articlePageData.totalPage>articlePageData.pageIndex+4">
						<s:bean name="org.apache.struts2.util.Counter" id="pages">
							<s:param name="first" value="articlePageData.pageIndex" />
							<s:param name="last" value="articlePageData.pageIndex+2"></s:param>
						</s:bean>
					</s:if>
					<s:else>
						<s:bean name="org.apache.struts2.util.Counter" id="pages">
							<s:param name="first" value="articlePageData.pageIndex" />
							<s:param name="last" value="articlePageData.totalPage"></s:param>
						</s:bean>
					</s:else>
					<s:iterator value="#pages" id="page" status="s">
						<a
							href='<%=root%>/system/home.action?pageIndex=<s:property value="#page"/>&catogoryId=<s:property value="catogoryId"/>'>第<s:property
								value="#page" />页</a>
					</s:iterator>
					<a
						href='<%=root%>/system/home.action?pageIndex=<s:property value="articlePageData.pageIndex+1"/>&catogoryId=<s:property value="catogoryId"/>'>后一页</a>
					<a
						href='<%=root%>/system/home.action?pageIndex=<s:property value="articlePageData.totalPage"/>&catogoryId=<s:property value="catogoryId"/>'>末页</a>
				</div>
			</div>





			<div class="right_content">
				<div class="right_content_left_area">
					<div class="panel">
						<div class="panel_header">
							<h3>
								文章分类：
							</h3>
						</div>
						<div class="panel_body">
							<ul>
								<s:if test="catogories.size()==0">
									<li>
										暂无分类
									</li>
								</s:if>
								<s:else>
									<s:iterator value="catogories" id="catogory" status="s">
										<li>
											<a
												href='<%=root%>/system/home.action?catogoryId=<s:property value="#catogory.id" />'>
												<s:property value="#catogory.name" /> </a>
										</li>
									</s:iterator>
								</s:else>
							</ul>
						</div>
						<div class="panel_footer"></div>
					</div>
					<div class="panel">
						<div class="panel_header">
							<h3>
								链接：
							</h3>
						</div>
						<div class="panel_body">
							<ul>
								<s:if test="links.size()==0">
									<li>
										暂无链接
									</li>
								</s:if>
								<s:else>
									<s:iterator value="links" id="link" status="s">
										<li>
											<a target='_blank' href='<s:property value="#link.url" />'> <s:property
													value="#link.name" /> </a>
										</li>
									</s:iterator>
								</s:else>
							</ul>
						</div>
						<div class="panel_footer"></div>
					</div>
				</div>
				<div class="right_content_right_area">
					<div class="panel">
						<div class="panel_header">
							<h3>
								最新文章
							</h3>
						</div>
						<div class="panel_body">
							<ul>
								<s:iterator value="articlePageData.pageData" id="article"
									status="status">
									<li>
										<a
											href='<%=root%>/system/articleRead.action?readArticle=<s:property value="#article.id"/>'><s:property
												value="#article.title" /> </a>
									</li>
								</s:iterator>
							</ul>
						</div>
						<div class="panel_footer"></div>
					</div>
				</div>
			</div>
		</div>

	</body>
</html>
